package org.spring.springcloud.provider.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CityController {
	
	private Logger logger = LoggerFactory.getLogger(CityController.class);
	
	@Value("${server.port}")
    String port;
    
    
    @RequestMapping("/user/{name}")
    public String home(@PathVariable("name") String name) {
    	logger.info(name + "---------------name");
        return "hi "+name+",i am from port:" +port;
    }

}
